class Solution {
public:
    string sortVowels(string s) {
        
        string record;
        unordered_set<char> has({'a','e','i','o','u','A','E','I','O','U'});
        for(int i=0;i<s.size();++i){
            if(has.count(s[i])){
                record+=s[i];
                s[i]='#';
            }   
        }
        sort(record.begin(),record.end());
        int nIdx=0;
        for(int i=0;i<s.size();++i){
            if(s[i]=='#'){
                s[i]=record[nIdx++];
            }
        }

        return s;
    }
};
